.class public Lcom/estrongs/android/pop/app/imageviewer/d;
.super Ljava/lang/Object;
.source "ImageLoader.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/imageviewer/d$d;,
        Lcom/estrongs/android/pop/app/imageviewer/d$c;,
        Lcom/estrongs/android/pop/app/imageviewer/d$b;
    }
.end annotation


# instance fields
.field private final a:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/estrongs/android/pop/app/imageviewer/d$c;",
            ">;"
        }
    .end annotation
.end field

.field private b:Z

.field private c:Ljava/lang/Thread;

.field private d:Landroid/content/ContentResolver;

.field private e:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    const-string v0, "Image Loader - Mini"

    .line 3
    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->e:Ljava/lang/String;

    .line 4
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/imageviewer/d;->c()V

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;)V
    .locals 1

    .line 5
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 6
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    const-string v0, "Image Loader - Mini"

    .line 7
    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->e:Ljava/lang/String;

    .line 8
    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->e:Ljava/lang/String;

    .line 9
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/imageviewer/d;->c()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/imageviewer/d;)Ljava/util/ArrayList;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    return-object p0
.end method

.method static synthetic b(Lcom/estrongs/android/pop/app/imageviewer/d;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->b:Z

    return p0
.end method

.method private c()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->c:Ljava/lang/Thread;

    if-eqz v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->b:Z

    .line 3
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/estrongs/android/pop/app/imageviewer/d$d;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/estrongs/android/pop/app/imageviewer/d$d;-><init>(Lcom/estrongs/android/pop/app/imageviewer/d;Lcom/estrongs/android/pop/app/imageviewer/d$a;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 4
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V

    .line 5
    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->c:Ljava/lang/Thread;

    .line 6
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method


# virtual methods
.method public a(Les/cm;)Landroid/graphics/Bitmap;
    .locals 0

    .line 16
    invoke-interface {p1}, Les/cm;->e()Landroid/graphics/Bitmap;

    move-result-object p1

    return-object p1
.end method

.method public a(Les/cm;Lcom/estrongs/android/pop/app/imageviewer/d$b;I)V
    .locals 2

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->c:Ljava/lang/Thread;

    if-nez v0, :cond_0

    .line 3
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/imageviewer/d;->c()V

    .line 4
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    monitor-enter v0

    .line 5
    :try_start_0
    new-instance v1, Lcom/estrongs/android/pop/app/imageviewer/d$c;

    invoke-direct {v1, p1, p2, p3}, Lcom/estrongs/android/pop/app/imageviewer/d$c;-><init>(Les/cm;Lcom/estrongs/android/pop/app/imageviewer/d$b;I)V

    .line 6
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 7
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {p1}, Ljava/lang/Object;->notifyAll()V

    .line 8
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a()[I
    .locals 5

    .line 9
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    monitor-enter v0

    .line 10
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    .line 11
    new-array v2, v1, [I

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v1, :cond_0

    .line 12
    iget-object v4, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/estrongs/android/pop/app/imageviewer/d$c;

    iget v4, v4, Lcom/estrongs/android/pop/app/imageviewer/d$c;->c:I

    aput v4, v2, v3

    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 13
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 14
    monitor-exit v0

    return-object v2

    :catchall_0
    move-exception v1

    .line 15
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw v1

    :goto_2
    goto :goto_1
.end method

.method public b()V
    .locals 3

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    monitor-enter v0

    const/4 v1, 0x1

    .line 3
    :try_start_0
    iput-boolean v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->b:Z

    .line 4
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->c:Ljava/lang/Thread;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->d:Landroid/content/ContentResolver;

    if-eqz v1, :cond_0

    .line 7
    :try_start_1
    invoke-static {}, Lcom/estrongs/android/pop/app/imageviewer/BitmapManager;->a()Lcom/estrongs/android/pop/app/imageviewer/BitmapManager;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->d:Landroid/content/ContentResolver;

    invoke-virtual {v1, v0, v2}, Lcom/estrongs/android/pop/app/imageviewer/BitmapManager;->a(Ljava/lang/Thread;Landroid/content/ContentResolver;)V

    .line 8
    invoke-virtual {v0}, Ljava/lang/Thread;->join()V

    const/4 v0, 0x0

    .line 9
    iput-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/d;->c:Ljava/lang/Thread;
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0

    :catch_0
    :cond_0
    return-void

    :catchall_0
    move-exception v1

    .line 10
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v1
.end method
